import router from '@ohos.router'

export default class page {
  static navigate(view: string) {
    router.pushUrl({
      url: "pages/" + view,
      params: {}
    });
  }

  static navigateReplace(view: string) {
    router.replaceUrl({
      url: "pages/" + view,
      params: {}
    });
  }

  static navigateWith(view: string, paras: object) {
    router.pushUrl({
      url: "pages/" + view,
      params: paras
    });
  }

  static navigateBack() {
    router.back();
    router.clear();
  }
}